﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using QuestionsAnswers.UI.Models;

namespace QuestionsAnswers.UI.Controllers
{

    [Authorize]
    public class ProfileController : Controller
    {
        private readonly QuestionsAnswersContext _db = new QuestionsAnswersContext();
        //
        // GET: /Profile/

        public ActionResult Index()
        {
            User user = _db.Users.First(x => x.UserName == User.Identity.Name);

            return View(user);
        }

    }
}
